package com.ruoyi.media.forestApi;

import com.dtflys.forest.annotation.*;
import org.apache.ibatis.annotations.Param;

import java.util.Map;

/**
 * 视频号小店请求接口
 */
@BaseRequest(
    baseURL = "https://channels.weixin.qq.com/",
    headers = {
        "User-Agent:Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36"
    }
)
public interface SphxdApi {

    /**
     * 获取账号token
     * @return
     */
    @Get(url = "/shop/order/list",
        headers = {
            "Cookie:${cookie}",
            "Accept:application/json, text/plain, */*"
        })
    String getIndexToken(@Var("cookie")String cookie);

    /**
     * 请求视频号小店代发货数据
     * @return
     */
    @Get(url = "/shop-faas/mmchannelstradeorder/cgi/getList",
    headers = {
        "Cookie:${cookie}",
        "Accept:application/json, text/plain, */*"
    })
    String getOrderList(@Var("cookie")String cookie,@Query Map<String,Object> params);


    /**
     * 根据商品编码发货
     * @return
     */
    @Post(url = "/shop-faas/mmchannelstradeorder/cgi/sendOutGood?token=&lang=zh_CN",
        headers = {
            "Cookie:${cookie}",
            "Accept:application/json, text/plain, */*"
        })
    String sendOutGood(@Var("cookie")String cookie,@Body Map<String,Object> params);

}
